#include <iostream>
#include <unordered_set>
#include <vector>
using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<unordered_set<int>> vhash(n);
    vector<int> ret;
    for (int i = 0; i < n; i++)
    {
        int m;
        cin >> m;
        for (int j = 0; j < m; j++)
        {
            int t;
            cin >> t;
            vhash[i].insert(t);
        }
    }
    int k;
    cin >> k;
    for (int i = 0; i < k; i++)
    {
        int t;
        cin >> t;
        bool flg = true;
        for (int j = 0; i < n; j++)
        {
            if (vhash[j].count(t) && vhash[j].size() > 1)
            {
                flg = false;
                break;
            }
        }
        if (flg)
            ret.push_back(t);
    }
    if (ret.empty())
        cout << "No one is handsome";
    else {
        cout << ret[0];
        if (ret.size() > 1)
            for (int i = 1; i < ret.size(); i++)
                cout << ' ' << ret[i];
    }
    return 0;
}